package com.lottery.im.api.result.entity.msg_bulletin;

import android.databinding.BindingAdapter;
import android.text.Html;
import android.text.Spanned;
import android.util.Log;
import android.webkit.WebView;

public class Messages {
  private long id;
  private String messageTitle;
  private String message;
  private String createTime;
  private int state;
  private int messageType;
  private String messageTypeName;

  @BindingAdapter("dataBaseUrl")
  public static void setDataBaseUrl(WebView webView, String html) {
    webView.loadDataWithBaseURL(null, html,
        "text/html", "UTF-8", null);
  }

  public long getId() {
    return id;
  }

  public void setId(long id) {
    this.id = id;
  }

  public String getMessageTitle() {
   return messageTitle;
  }

  public void setMessageTitle(String messageTitle) {
    this.messageTitle = messageTitle;
  }

  public String getMessage() {
    return message;
  }

  public void setMessage(String message) {
    this.message = message;
  }

  public String getCreateTime() {
    createTime=createTime.substring(0,8);
    StringBuilder builder = new StringBuilder(createTime);
    builder.insert(4,"-");
    builder.insert(7,"-");
    return builder.toString();
  }

  public void setCreateTime(String createTime) {
    this.createTime = createTime;
  }

  public int getState() {
    return state;
  }

  public void setState(int state) {
    this.state = state;
  }

  public int getMessageType() {
    return messageType;
  }

  public void setMessageType(int messageType) {
    this.messageType = messageType;
  }

  public String getMessageTypeName() {
    return messageTypeName;
  }

  public void setMessageTypeName(String messageTypeName) {
    this.messageTypeName = messageTypeName;
  }
}
